/*
 * @Author: your name
 * @Date: 2021-01-13 17:39:02
 * @LastEditTime: 2022-02-11 10:42:30
 * @LastEditors: 晟松
 * @Description: In User Settings Edit
 * @FilePath: \volunteer-vue3-admin\src\router\mainRoutes.js
 */
/* eslint-disable */

import AppMain from "@/views/AppMain.vue";
import HomeVue from "@/views/Home.vue";

export default {
    path: "/",
    name: "AppMain",
    component: AppMain,
    redirect: { name: "Home" },
    children: [
        {
            path: "home",
            name: "Home",
            component: HomeVue,
            meta: {
                name: "首页",
            },
        },
        {
            path: "allSchool",
            name: "AllSchool",
            component: () => import("@/views/AllSchool.vue"),
            meta: {
                name: "所有学校",
            },
        },
        {
            path: "allCommunity",
            name: "AllCommunity",
            component: () => import("@/views/AllCommunity.vue"),
            meta: {
                name: "所有社区",
            },
        },
        {
            path: "profile",
            name: "Profile",
            component: () => import("@/views/Profile.vue"),
            meta: {
                name: "个人中心",
            },
        },
        {
            path: "message",
            name: "Message",
            component: () => import("@/views/Message.vue"),
            meta: {
                name: "消息",
            },
        },
        {
            path: "test",
            name: "Test",
            component: () => import("@/views/schoolPages/test.vue"),
            meta: {
                name: "测试",
            },
        },
        {
            path: "test1",
            name: "Test1",
            component: () => import("@/views/schoolPages/test1.vue"),
            meta: {
                name: "测试1",
            },
        },
        {
            path: "AllStudent",
            name: "AllStudent",
            component: () => import("@/views/schoolPages/AllStudent.vue"),
            meta: {
                name: "所有学生",
            },
        },
        {
            path: "StudentReview",
            name: "StudentReview",
            component: () => import("@/views/schoolPages/StudentReview.vue"),
            meta: {
                name: "学生审核",
            },
        },
        {
            path: "CollegeReview",
            name: "CollegeReview",
            meta: {
                allow: "schoolAdmin",
                name: "辅导员审核",
            },
            component: () => import("@/views/schoolPages/CollegeReview.vue"),
        },
        {
            path: "AllCollege",
            name: "AllCollege",
            meta: {
                allow: "schoolAdmin",
                name: "所有辅导员",
            },
            component: () => import("@/views/schoolPages/AllCollege.vue"),
        },
        {
            path: "StudentVol",
            name: "StudentVol",
            component: () => import("@/views/schoolPages/StudentVol.vue"),
            meta: {
                name: "学生志愿服务",
            },
        },
        {
            path: "MyGroupVol",
            name: "MyGroupVol",
            component: () => import("@/views/schoolPages/groupVol/MyGroupVol.vue"),
            meta: {
                name: "大型志愿服务记录",
            },
        },
        {
            path: "PublicGroupVol",
            name: "PublicGroupVol",
            component: () => import("@/views/schoolPages/groupVol/PublicGroupVol.vue"),
            meta: {
                name: "公开大型志愿服务",
            },
        },
        {
            path: "RequestGroupVol",
            name: "RequestGroupVol",
            component: () => import("@/views/schoolPages/groupVol/RequestGroupVol.vue"),
            meta: {
                name: "私有大型志愿服务",
            },
        },
        /**
         * @description: 居委会的路由了
         * @param {*}
         * @return {*}
         */
        {
            path: "AllResident",
            name: "AllResident",
            component: () => import("@/views/communityPages/AllResident.vue"),
            meta: {
                name: "所有居民",
            },
        },
        {
            path: "ResidentReview",
            name: "ResidentReview",
            component: () => import("@/views/communityPages/ResidentReview.vue"),
            meta: {
                name: "居民审核",
            },
        },
        {
            path: "ResidentVol",
            name: "ResidentVol",
            component: () => import("@/views/communityPages/ResidentVol.vue"),
            meta: {
                name: "居民志愿服务",
            },
        },
        {
            path: "ResidentVolReview",
            name: "ResidentVolReview",
            component: () => import("@/views/communityPages/ResidentVolReview.vue"),
            meta: {
                name: "居民志愿服务审核",
            },
        },
        {
            path: "GroupVol",
            name: "GroupVol",
            component: () => import("@/views/communityPages/GroupVol.vue"),
            meta: {
                name: "大型志愿服务",
            },
        },

        // 为什么这种嵌套就不行？
        /* {
            path: "school",
            name: "School",
            component: () => import("@/views/schoolPages/School.vue"),
            // redirect: { name: "AllStudent" },
            children: [
                {
                    path: "AllStudent",
                    name: "AllStudent",
                    component: () =>
                        import("@/views/schoolPages/AllStudent.vue"),
                },
                {
                    path: "StudentReview",
                    name: "StudentReview",
                    component: () =>
                        import("@/views/schoolPages/StudentReview.vue"),
                },
                {
                    path: "CollegeReview",
                    name: "CollegeReview",
                    meta: {
                        allow: "schoolAdmin",
                    },
                    component: () =>
                        import("@/views/schoolPages/CollegeReview.vue"),
                },
                {
                    path: "AllCollege",
                    name: "AllCollege",
                    meta: {
                        allow: "schoolAdmin",
                    },
                    component: () =>
                        import("@/views/schoolPages/AllCollege.vue"),
                },
                {
                    path: "StudentVol",
                    name: "StudentVol",
                    component: () =>
                        import("@/views/schoolPages/StudentVol.vue"),
                },
                {
                    path: "MyGroupVol",
                    name: "MyGroupVol",
                    component: () =>
                        import("@/views/schoolPages/groupVol/MyGroupVol.vue"),
                },
                {
                    path: "PublicGroupVol",
                    name: "PublicGroupVol",
                    component: () =>
                        import(
                            "@/views/schoolPages/groupVol/PublicGroupVol.vue"
                        ),
                },
                {
                    path: "RequestGroupVol",
                    name: "RequestGroupVol",
                    component: () =>
                        import(
                            "@/views/schoolPages/groupVol/RequestGroupVol.vue"
                        ),
                },
            ],
        }, */
    ],
};
